home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / CON-03A.ZIP / WFC.PAS < prev    next >
Pascal/Delphi Source File  |  1995-11-02  |  4KB  |  158 lines

  1. (* Groovy(tm) BBS Software Version 0.01α (c)1995 Grooven Designs  *)
  2. (* Conspiracy Waiting for Caller                                  *)
  3. (* Coded by Paul Maggs / Grooven Designs                          *)
  4.  
  5. (* Conspiracy v0.02α Waiting For Caller Unit *)
  6. unit wfc;
  7. interface
  8.  
  9. procedure init_ansi_file;
  10. procedure set_options;
  11. procedure exit;
  12. procedure menu;
  13. procedure run_wfc;
  14.  
  15. implementation
  16.  
  17. uses crt,
  18.      g_wfc,
  19.      configur,
  20.      login;
  21.  
  22. {$R-}
  23.  
  24. var
  25.   i                : byte;
  26.   options          : array[1..8] of string[30];
  27.   choice           : char;
  28.   option           : byte;
  29.   grid_ref         : byte;
  30.   cows_come_home   : boolean;
  31.  
  32.  
  33.  
  34. procedure init_ansi_file;
  35. begin
  36.   clrscr;
  37.   write_picture('wfc');
  38. end;
  39.  
  40. procedure set_options;
  41. begin
  42.   options[1]:=' Local Logon     ';
  43.   options[2]:=' Sysop Logon     ';
  44.   options[3]:=' Configuration   ';
  45.   options[4]:=' Exit Conspiracy ';
  46. end;
  47.  
  48. procedure exit;
  49. begin
  50.   clrscr;
  51.   writeln('Thanks for using Groovy v0.1α');
  52.   halt
  53. end;
  54.  
  55. procedure menu;
  56. begin
  57.   gotoxy(4,6);
  58.   textcolor(0);
  59.   textbackground(3);
  60.   write(options[1]);
  61.   option:=1;
  62.   grid_ref:=6;
  63.   repeat;
  64.   choice:=readkey;
  65.   case choice of
  66.     #13       : if option=1 then begin
  67.                   textcolor(7);
  68.                   textbackground(0);
  69.                   login_user;
  70.                   end else
  71.                 if option=2 then begin
  72.                 end else
  73.                 if option=3 then begin
  74.                   textcolor(7);
  75.                   textbackground(0);
  76.                   run_config;
  77.                   run_wfc;
  78.                 end else
  79.                 if option=4 then begin
  80.                 exit;
  81.               end;
  82.  
  83.  
  84.     #27       : exit;
  85.     #80       : begin
  86.                   if option<4 then begin    {To enable it to loop}
  87.                     gotoxy(4,grid_ref);
  88.                     textbackground(0);
  89.                     textcolor(7);
  90.                     write(options[option]);
  91.                     inc(grid_ref);
  92.                     gotoxy(4,grid_ref);
  93.                     textbackground(3);
  94.                     textcolor(0);
  95.                     {i:=i-1;}
  96.                     writeln(options[option+1]);
  97.                     option:=option+1;
  98.                   end else begin
  99.                     gotoxy(4,grid_ref);
  100.                     textcolor(7);
  101.                     textbackground(0);
  102.                     write(options[4]);      {set to last option at the mo}
  103.                     grid_ref:=grid_ref-3;   {minus one less than total options}
  104.                     gotoxy(4,grid_ref);
  105.                     textcolor(0);
  106.                     textbackground(3);
  107.                     write(options[1]);
  108.                     option:=option-3;       {minus one less again}
  109.                   end
  110.                 end;
  111.  
  112.     #72       : begin
  113.                   if option>1 then begin
  114.                     gotoxy(4,grid_ref);
  115.                     textbackground(0);
  116.                     textcolor(7);
  117.                     write(options[option]);
  118.                     inc(grid_ref);
  119.                     gotoxy(4,grid_ref-2);
  120.                     textbackground(3);
  121.                     textcolor(0);
  122.                     {i:=i;}
  123.                     writeln(options[option-1]);
  124.                     option:=option-1;
  125.                     grid_ref:=grid_ref-2;
  126.                   end else begin
  127.                     gotoxy(4,grid_ref);
  128.                     textcolor(7);
  129.                     textbackground(0);
  130.                     write(options[1]);      {set to first option at the mo}
  131.                     grid_ref:=grid_ref+3;
  132.                     gotoxy(4,grid_ref);
  133.                     textcolor(0);
  134.                     textbackground(3);
  135.                     write(options[4]);
  136.                     option:=option+3;
  137.                   end;
  138.  
  139.                 end;
  140.  
  141.  
  142. end;
  143. cows_come_home:=false;
  144. until cows_come_home;
  145.  
  146.  
  147. end;
  148.  
  149. (* ------------------------------------------------------------------------ *)
  150.  
  151.  
  152. procedure run_wfc;
  153. begin
  154.   init_ansi_file;
  155.   set_options;
  156.   menu;
  157. end;
  158. end.